package com.mediator.impl;

import com.mediator.Colleague;
import com.mediator.Mediator;

public class CPU extends Colleague {

	public CPU(Mediator mediator) {
		super(mediator);
	}

	private String videoData = null;

	private String soundData = null;

	public String getVideoData() {
		return this.videoData;
	}

	public String getSoundData() {
		return this.soundData;
	}

	/**
	 * 处理数据，把数据分解成视频数据和音频数据
	 * 
	 * @param data
	 *            被处理的数据
	 */
	public void executeData(String data) {
		String[] ss = data.split(",");
		this.videoData = ss[0];
		this.soundData = ss[1];

		// 通知主板，CPU工作已完成
		this.getMediator().changed(this);
	}

}
